package util;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.cfg.Configuration;

public class HibernateUtil {
	
	private static SessionFactory session;
	
	static{
		Configuration configuration = new AnnotationConfiguration();
		configuration.configure();
		
		session = configuration.buildSessionFactory();
	}
	
	public static Session getSession(){
		return session.openSession();
	}

}
